package co.yixiang.huiMin.controller;


import co.yixiang.annotation.AnonymousAccess;
import co.yixiang.huiMin.entity.YxStoreProduct;
import co.yixiang.huiMin.service.YxStoreProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;

/**
 * <p>
 * 商品表 前端控制器
 * </p>
 *
 * @author Author
 * @since 2020-07-04
 */

@Api(tags = "商品")
@RestController
@RequestMapping("/yxStoreProduct")
public class YxStoreProductController {


         @Resource
         private YxStoreProductService yxStoreProductService;

    @ApiOperation("查询首页商户统计")
    @AnonymousAccess
    @GetMapping("selectYxStoreProductCount")
    public ResponseEntity selectYxStoreProductCount(String merId){
        HashMap<String, Object> stringObjectHashMap = new HashMap<>();
        stringObjectHashMap.put("code",200);

        stringObjectHashMap.put("message",yxStoreProductService.selectYxStoreProductCount(merId));
        return ResponseEntity.ok(stringObjectHashMap);
    }
}

